package com.freshminds.saudiproject;

import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class Utility 
{

	Context context;
	
	
	public Utility(Context context) 
	{
		this.context=context;
	}
	
	void showToast(String message)
	{
		Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
	}
	
	public void SendEmail()
	{
		Intent i = new Intent(Intent.ACTION_SEND);
		i.setType("text/plain");
		i.putExtra(Intent.EXTRA_EMAIL  , new String[]{"recipient@example.com"});
		i.putExtra(Intent.EXTRA_SUBJECT, ""+Constants.EMAIL_Subject);
		i.putExtra(Intent.EXTRA_TEXT   , ""+Constants.EMAIL_Message);
		try 
		{
		    context.startActivity(Intent.createChooser(i, "Send mail..."));
		} catch (android.content.ActivityNotFoundException ex) 
		{
		    Toast.makeText(context, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
		}
	}
	
	
	
}
